package com.roughike.keyvaluestoreflutter;

import android.content.Context;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;

public class KeyValueStoreMethodCallHandler implements MethodChannel.MethodCallHandler {
    private final Context context;

    public KeyValueStoreMethodCallHandler(Context context) {
        this.context = context;
    }

    @Override
    public void onMethodCall(MethodCall call, MethodChannel.Result result) {
        // 在这里实现你的方法调用处理逻辑
        if (call.method.equals("getValue")) {
            // 示例实现
            String key = call.argument("key");
            // 从存储中获取值
            result.success("value_for_" + key);
        } else {
            result.notImplemented();
        }
    }
}